<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;
use App\Models\Record;
class HomeController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        //$this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {

        $data = [
            'user_id' => 0,
            'name' => 123,
            'origin' => 'FAST',
            'mobile' => 123,
            'fee' => 1,
            'sex' => 3,
            'time_limit' => 123,
            'status' => 0,
            'create_time' => date('Y-m-d H:i:s',time())
        ];
        //return Response::json($data);
        $result = Record::create($data);
        dd($result);
        return view('home');
    }

    public function show(){
        return 123;
        return $name = Route::currentRouteName();
    }
}
